import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutterapp/utils/LocaleUtils.dart';

import 'home.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
        localizationsDelegates: [
          // 本地化代理类
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          //注册我们的代理类
         AppLocalizationsDelegate()
        ],
        locale: const Locale('zh', 'CN'),
        // 应用名称
        title: "app",
        // 路由"/" 作为应用的home页面
        theme: ThemeData(primaryColor: Colors.blue),
        debugShowCheckedModeBanner: true,
        // 应用首页路由
        home: new HomeRoute());
  }
}
